﻿<%@ Page Title="" Language="C#" MasterPageFile="~/DCTEDU_/HeThongMaster.master" AutoEventWireup="true"
    CodeBehind="QLLienHe.aspx.cs" Inherits="QuanLyThietBi.DCTEDU_.QuanTri.QLLienHe" %>

<%@ Register Assembly="PagerControl" Namespace="CutePager" TagPrefix="cc1" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
    <title>Quản lý Liên hệ</title>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
    <asp:UpdatePanel ID="upPanel1" runat="server" UpdateMode="Conditional">
        <ContentTemplate>
            <asp:HiddenField runat="server" ID="H_LienHeId" Value="0" />
            <div class="row">
                <div class="col-sm-12">
                    <section class="panel">
                        <header class="panel-heading">
                            Danh sách Liên hệ<asp:Literal runat="server" ID="litCountLienHe"></asp:Literal>
                            <span class="tools pull-right">
<asp:CheckBox runat="server" ID="chkTrangThai" AutoPostBack="True" OnCheckedChanged="chkTrangThai_OnCheckedChanged" Text=" Chưa duyệt?"/>  
                                <a href="javascript:;" class="fa fa-chevron-down"></a>
                             </span>
                        </header>
                        <div class="panel-body">
                            <div class="alert alert-danger clearfix">
                <span class="alert-icon"><i class="fa fa-envelope-o"></i></span>
                <div class="notification-info">
                    <ul class="clearfix notification-meta">
  
                    </ul>
                    <p>
                        1. Để phản hồi thông tin liên hệ của cán bộ, nhấn vào nút có biểu tượng <asp:Image runat="server" ID="imgPhanHoi" ImageUrl="~/Images/edit.png"/> để phản hồi liên hệ; <br/>
                        2. Để xóa phản hồi thì nhấn vào nút có biểu tượng <asp:Image runat="server" ID="imgxoa" ImageUrl="~/Images/DeleteRed.png"/> để xóa liên hệ;<br/>
                        3. Thao tác từng bước 1 để hệ thống tự động xử lý và in ra kết quả tương ứng.
                    </p>
                </div>
            </div>
                            <table class="table table-striped">
                                <thead>
                                <tr>
                                    <th>#</th> 
                                     <th>Tác vụ</th>
                                     <th>Tiêu đề</th>
                                    <th>Nội dung</th>
                                     <th>Cán bộ</th>  
                                    <th>Phản hồi</th>
                                    <th>Ngày cập nhật</th> 
                                    <th>Tình trạng</th>
                                </tr>
                                </thead>
                                <tbody>
                                <asp:Repeater runat="server" ID="rpLienHe" OnItemCommand="rpLienHe_ItemCommand"><ItemTemplate>  
                                
                                <tr>
                                    <td><%# Container.ItemIndex + 1%></td> 
                                    <td width="100px"><asp:ImageButton runat="server" ID="cmdEdit" CommandName="Edit" CommandArgument='<%# Eval("MaLienHe") %>' ImageUrl="~/Images/edit.png" ToolTip="Click để cập nhật"></asp:ImageButton>&nbsp;<asp:ImageButton runat="server" ID="cmdDelete" CommandName="Delete" CommandArgument='<%# Eval("MaLienHe") %>' ImageUrl="~/Images/DeleteRed.png" ToolTip="Click để xóa" ></asp:ImageButton></td>
                                    <td><%# Eval("TieuDe") %></td>    
                                    <td><%# Eval("NoiDung") %></td>
                                    <td><%# getTenCanBo(Eval("MaCanBo"))%></td>  
                                    <td><%# getPhanHoi(Eval("MaLienHe")) %></td>
                                    <td><%# Convert.ToDateTime(Eval("NgayCapNhat")).ToString("dd/MM/yyyy HH:mm") %></td> 
                                   <td><%# (Eval("TrangThai").ToString()) == "True" ? "<html><img src=../../Images/checkk.png title='Đã duyệt' /></html>" : "<html><img src=../../Images/redx.png  title='Chưa duyệt' /></html>"%></td>
                                </tr>      
                                
                                </ItemTemplate></asp:Repeater> 
                                  <cc1:Pager ID="Pager1" runat="server" PreviousClause="Lùi" NextClause="Tiến" LastClause=""
                                    FirstClause="" PageClause="Trang " OfClause=" /" PageSize="8" OnCommand="Pager1_Command"
                                    ForeColor="#006600" Font-Bold="True" />
                                </tbody>
                            </table>
                        </div>

                    </section>
                </div>
            </div>
            <asp:Panel class="row" runat="server" ID="pnThem" Visible="False">
                <div class="col-lg-12">
                    <section class="panel">
                        <header class="panel-heading">
                           Liên hệ - Góp ý
                              <span class="tools pull-right">
                                <a class="fa fa-chevron-down" href="javascript:;"></a>
                            </span>
                        </header>
                        <div class="panel-body">
                          <div class="row"> 
                    <div class="form-group">
                        <label class="col-sm-6 control-label">Tiêu đề:<span style="color: Red">(*)</span></label>
                        <div class="col-sm-6">
                        <asp:TextBox ID="txtTieuDe" Enabled="False" runat="server" CssClass="form-control error" ></asp:TextBox>
                        </div>
                    </div>  </div> 
                     <div class="row">&nbsp;
                         </div>  
                          <div class="row">
                      <div class="form-group">
                        <label class="col-sm-6 control-label">Nội dung:<span style="color: Red">(*)</span></label>
                        <div class="col-sm-6">
                        <asp:TextBox ID="txtNoiDung" runat="server" Enabled="False" TextMode="MultiLine" Rows="3" CssClass="form-control  error" ></asp:TextBox>
                        </div>
                    </div> </div>    
                     <div class="row">&nbsp;
                         </div>  
                          <div class="row">
                      <div class="form-group">
                        <label class="col-sm-6 control-label">Phản hồi:<span style="color: Red">(*)</span></label>
                        <div class="col-sm-6">
                        <asp:TextBox ID="txtPhanHoi" runat="server" TextMode="MultiLine" Rows="3" CssClass="form-control  error" ></asp:TextBox>
                        </div>
                    </div> </div> 
                    <div class="row">&nbsp;
                         </div>
                         <div class="form-group">
                         <asp:Button ID="cmdSend" runat="server" 
                 Style="float: right; position: relative; bottom: 5px;margin-left: 5px;"
                OnClick="cmdSend_OnClick" Text="Cập nhật liên hệ" CausesValidation="False" CssClass="btn btn-primary btn-image-save" />  
                   </div>       
                        </div>  
                       
            </section>
                </div>  
                 </asp:Panel>
        </ContentTemplate>
    </asp:UpdatePanel>
    <asp:UpdateProgress runat="server" ID="UpdateProgress2" AssociatedUpdatePanelID="upPanel1">
        <ProgressTemplate>
            <div style="top: 20%; right: 50%; transition: all 300ms ease 100ms; color: Black;
                padding: 8px; position: fixed; z-index: 10000">
                <asp:Image runat="server" ID="imgloading" ImageUrl="~/Images/loading.gif" /></div>
        </ProgressTemplate>
    </asp:UpdateProgress>
</asp:Content>
